package co.gov.medellin.ssti.sub.paoyer.common.validator;

import co.gov.medellin.ssti.sub.paoyer.common.exception.CommonUserException;
import co.gov.medellin.ssti.sub.paoyer.common.exception.UserException;

public class FieldValidator {

	public FieldValidator() {
	}

	public static void validateString(String str) {

		if ((str == null) || (str.equals(""))) {
			throw new UserException(new CommonUserException().getModuleVO(),
					CommonUserException.NOT_ALL_REQUIRED_FIELDS);
		}

	}

	public static void validateNumber(double num) {
		if (num == 0) {
			throw new UserException(new CommonUserException().getModuleVO(),
					CommonUserException.NOT_ALL_REQUIRED_FIELDS);
		}

	}

}